﻿@model List<PessMvc.Models.PreviousArchiveModel>

<div class="m-sd-xx m-sd-title">
    <div class="title">
        以往评审资料
    </div>
    <div class="sidebd displayCoordinate">
 @if (Model != null)
{
        foreach (var m in Model)
        {
            <div>
                <span>@m.ActivityName</span>
                <span>@m.TeacherName</span>
                <span>@m.SerialNumber</span>
                <span>@m.Archive.Conclusion</span>
            </div>
            <div id="showFile" class="displayValue" style="width:790px;margin-top:10px;">
                    @{
            var grid = new WebGrid(m.Archive.Attachments, defaultSort: "Title");
                    }
                    @grid.GetHtml(columns: from c in grid.Columns(
                     grid.Column("Title", header: " 文件名 ", format: @<text>@Html.ActionLink((string)item.Title, "Download", "Archive", new { archiveID = item.ArchiveID, title = (string)item.Title }, null)</text>, style: "thAction2"),
                     grid.Column("FileSize", header: " 文件大小（KB） "),
                     grid.Column("TimeStamp", header: " 最后修改时间 ")
                 )
                                           where !c.ColumnName.Contains("Operation") || (Roles.IsUserInRole("Admin") || Roles.IsUserInRole("CountyAdmin"))
                                           select c
                              )
                </div>
            
        }    
}
else
{
    <h3>没有历史档案</h3>
}
   </div>
</div>

